{extend name="common/base" }

{block name="content"}
<form action="{:module_url('index')}" class="search-form">
<div class="am-g">

	<div class="am-u-sm-12 am-u-md-6">
		<div class="am-btn-toolbar">
			<div class="am-btn-group am-btn-group-xs">
				<a class="am-btn am-btn-default nd-refresh">
					<span class="am-icon-refresh"></span> 刷新
				</a>
			</div>
		</div>
	</div>
	
	{$widget->search('select', ['name' => 'status', 'value' => $status, 'list' => $status_list, 'md_num' => 3])}
	
	{$widget->search('keyword', ['name' => 'keyword', 'holder' => '关键词', 'value' => $keyword, 'md_num' => 3])}
	
</div>
</form>
<br/>

<div class="am-g">
	<div class="am-u-sm-12">
		<table class="am-table am-table-striped am-table-radius am-table-bordered">
			<thead>
				<tr>
					<th>名称</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			{volist name="_list" id="vo"}
				<tr>
					<td>{$vo.tag_name}</td>
					<td>
						{$widget->row('select', ['value' => $vo['tag_status'], 'list' => $status_list, 'url' => module_url('modify', ['id' => $vo['id'], 'field' => 'tag_status'])])}
					</td>
					<td>
						<div class="am-btn-toolbar">
							<div class="am-btn-group am-btn-group-xs">
								{$widget->row('button', ['title' => '删除', 'class' => 'am-text-danger ajax-get ajax-confirm', 'icon' => 'am-icon-trash-o', 'url' => module_url('delete', ['id' => $vo['id']])])}
							</div>
						</div>
					</td>
				</tr>
			{/volist}
			</tbody>
		</table>
		
		{if condition="!empty($_page)"}
            <div class="am-fl">共 {$_total} 条记录</div>
            <div class="am-fr"> {$_page}</div>
        {/if}
	</div>
</div>
{/block}